#ifndef __INC_REGISTERSET
#define __INC_REGISTERSET

#include "register.h"

#define REGISTERS_IN_SET 8

/*
 * A bank of 8 generic 16-bit registers and several specialized registers.
 */
typedef struct
{
	/*
	 * A bank of general purpose registers.
	 */
	Register general_purpose_registers[REGISTERS_IN_SET];
} RegisterSet;

/*
 * RegisterSet *new_registerset(void);
 * Constructs a new registerset and returns a pointer to it.
 */
RegisterSet *new_registerset(void);

/*
 * void registerset_initialize(RegisterSet *registerset);
 * Initializes each register in the set.
 * registerset: a pointer to the registerset to modify
 */
void registerset_initialize(RegisterSet *registerset);

/*
 * void registerset_set_register(RegisterSet *, int, unsigned short);
 * Sets the value of a register in the set.
 * registerset: a pointer to the registerset to modify
 * register_index: the 0-based index of the register to modify
 * value: the value to set the register to
 */
void registerset_set_register(RegisterSet *registerset, int register_index, unsigned short value);

/*
 * Register registerset_get_register(RegisterSet *registerset, int register_index);
 * Gets the value of a register in the set.
 * registerset: a pointer to the registerset to query
 * register_index: the 0-based index of the register to get the value of
 */
Register registerset_get_register(RegisterSet *registerset, int register_index);

/*
 * void delete_registerset(RegisterSet *registerset);
 * Frees the memory associated with the register.
 * registerset: a pointer to the registerset to delete
 */
void delete_registerset(RegisterSet *registerset);

#endif
